﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using The_LarX;
using Microsoft.Xna.Framework;

namespace LarX_Editor
{
    public class ArrayShower : Component
    {
        public ArrayShower(GameScreen gs)
            : base(gs)
        {
            this.Serialiable = false;
        }

        public List<Vector3> ListToDraw;
        public Camera3D Camera;

        public override void Draw()
        {
            base.Draw();

            if (ListToDraw != null)
            {
                List<Vector3> drawed = new List<Vector3>();
                for (int i = 0; i < ListToDraw.Count; i++)
                {
                    if (drawed.Contains(ListToDraw[i]))
                    {
                        Engine.RenderManager.DrawBoundingSphere(ListToDraw[i], 2, 24, Color.Blue, Camera);
                    }
                    else
                    {
                        Engine.RenderManager.DrawBoundingSphere(ListToDraw[i], 2, 24, Color.Red, Camera);
                        drawed.Add(ListToDraw[i]);
                    }
                }
            }
        }
    }
}
